//
//  MeHealthOrderVC.m
//  Ginix
//
//  Created by fzq on 2025/2/17.
//

#import "MeHealthOrderVC.h"
#import "MeHealthOrderView.h"

@interface MeHealthOrderVC ()
@property (nonatomic, strong) JXCategoryTitleView   * myCategoryView;
@property (nonatomic,strong) UIScrollView * contentView;

@property (nonatomic,strong) MeHealthOrderView * orderView;
@end

@implementation MeHealthOrderVC

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.view addSubview:self.myCategoryView];
    [self.view addSubview:self.contentView];
    
    [self.contentView addSubview:self.orderView];

}


-(JXCategoryTitleView *)myCategoryView{
    
    if (!_myCategoryView) {
        _myCategoryView = [[JXCategoryTitleView alloc]initWithFrame:CGRectMake(5, NavHeight + 10 * FMScaleX, WIDTH, 40)];
        _myCategoryView.titles = @[@"全部",@"待激活",@"已激活"];
        _myCategoryView.titleColor = RDRGB(0x666666);
        _myCategoryView.titleSelectedColor = RDRGB(0xAD7D62);
        _myCategoryView.titleLabelZoomScale = 1.2;
        _myCategoryView.titleLabelZoomEnabled = YES;
        _myCategoryView.contentScrollView = self.contentView;
        _myCategoryView.titleSelectedFont = Semibold(14);
        _myCategoryView.titleFont = Regular(14);
        
        JXCategoryIndicatorLineView *lineView = [[JXCategoryIndicatorLineView alloc] init];
        lineView.indicatorColor = RDRGB(0xAD7D62);
        lineView.indicatorWidth = 20 * FMScaleX;
        lineView.indicatorHeight = 3;
        _myCategoryView.indicators = @[lineView];
    }
    return _myCategoryView;
}
-(UIScrollView *)contentView{
    
    if (!_contentView) {
        _contentView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, GETMaxY(self.myCategoryView) +1, WIDTH, HEIGHT - NavHeight - 85 * FMScaleX - safaHeight - TabBarHeight)];
        _contentView.backgroundColor = UIColor.clearColor;
        _contentView.showsVerticalScrollIndicator = NO;
        _contentView.showsHorizontalScrollIndicator = NO;
        _contentView.bounces = NO;
        _contentView.pagingEnabled = YES;
    }
    return _contentView;
}

-(MeHealthOrderView *)orderView{
    
    if(!_orderView){
        _orderView = [[MeHealthOrderView alloc]initWithFrame:CGRectMake(0, 0, _contentView.getWidth, _contentView.getHeight)];
    }
    return _orderView;
}
@end
